package com.wangdao.wechatmall.bean.vo.admin;

import lombok.Data;

import java.util.List;

/**
 * 常见响应参数模板
 * @author ZhangXiao on 2021/7/5
 */
@Data
public class BaseDataVO<T> {
    List<T> items;

    long total;

    public static <T> BaseDataVO ok(List<T> items, long total) {
        BaseDataVO<T> tBaseData = new BaseDataVO<>();
        tBaseData.setItems(items);
        tBaseData.setTotal(total);
        return tBaseData;
    }
}
